#include "StdAfx.h"
#include "State.h"

#include "../Kernel.h"

extern Kernel* g_kernel;
#define TIME (g_kernel->GetTime())


/**
=====================================
Base State Class - Run a script and/or play
a sound entering a state
=====================================
*/
void State::Enter(BaseEntity* ent) 
{
    // play a sound going into the
    // state
    //if ( m_sound ) {
    //    m_sound->SetPosition( ent->m_physObject.GetPosition() );
    //    m_sound->Play(false); 
    //}

    // run a script
    if ( m_scriptFile != "" )
    {
        g_kernel->GetScriptEngine()->RunFile( m_scriptFile );
    }
}